From 1da9734e6c50a102b7ee43f331907baa5342d0ae Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Mon, 31 May 2004 08:43:36 +0000 Subject: [PATCH] Fixed site notice for monobook, displayed site notice for board vote --- includes/Setup.php | 4 ++++ includes/Skin.php | 2 +- includes/SkinPHPTal.php | 5 +++-- stylesheets/cologneblue.css | 4 ++++ stylesheets/monobook/main.css | 4 ++++ stylesheets/wikistandard.css | 5 +++++ templates/xhtml_slim.pt | 1 + 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/includes/Setup.php b/includes/Setup.php index 7a668080fa..5b5ee0980c 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -193,6 +193,10 @@ if ( !$wgAllowSysopQueries ) { SpecialPage::removePage( "Asksql" ); } +# Placeholders in case of DB error +$wgTitle = Title::newFromText( wfMsg( "badtitle" ) ); +$wgArticle = new Article($wgTitle); + # Extension setup functions # Entries should be added to this variable during the inclusion # of the extension file. This allows the extension to perform diff --git a/includes/Skin.php b/includes/Skin.php index a0ce7a8b1e..ddcfdf39bb 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -292,7 +292,7 @@ class Skin { global $wgUser, $wgOut, $wgSiteNotice; if( $wgSiteNotice ) { - $note = "\n
$wgSiteNotice
\n"; + $note = "\n
$wgSiteNotice
\n"; } else { $note = ""; } diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index eab7936b27..3ce8d22201 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -62,7 +62,7 @@ global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut; global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage; global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest; - global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses; + global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgSiteNotice; extract( $wgRequest->getValues( 'oldid', 'diff' ) ); @@ -172,7 +172,8 @@ $tpl->setRef( "debug", &$out->mDebugtext ); $tpl->set( "reporttime", $out->reportTime() ); - + $tpl->set( "sitenotice", $wgSiteNotice ); + $tpl->setRef( "bodytext", &$out->mBodytext ); $language_urls = array(); diff --git a/stylesheets/cologneblue.css b/stylesheets/cologneblue.css index 1bcba666c1..a138309084 100644 --- a/stylesheets/cologneblue.css +++ b/stylesheets/cologneblue.css @@ -93,3 +93,7 @@ a.stub { color:#772233; text-decoration:none; } h2, h3, h4, h5, h6 { margin-bottom: 0; } small { font-size: 75%; } +#siteNotice { + border: 1px solid red; +} + diff --git a/stylesheets/monobook/main.css b/stylesheets/monobook/main.css index 738fd5f134..5ba9b95cd5 100644 --- a/stylesheets/monobook/main.css +++ b/stylesheets/monobook/main.css @@ -851,6 +851,10 @@ fieldset.operaprefsection { margin-left: 15em } /* debugging tool.. */ /*div{ border:1px solid #000000;}*/ +#siteNotice { + border: 1px solid red; +} + /* Mac IE 5.0 fix; floated content turns invisible */ * > html #column-content { diff --git a/stylesheets/wikistandard.css b/stylesheets/wikistandard.css index 2f70ea5561..e852f9f1ce 100644 --- a/stylesheets/wikistandard.css +++ b/stylesheets/wikistandard.css @@ -50,3 +50,8 @@ p.catlinks { font-size:small; margin-top:0; text-align:right;} td { empty-cells:show; } td.bottom { border-top: 1px solid gray; } td.top { border-bottom: 1px solid gray; } + + +#siteNotice { + border: 1px solid red; +} diff --git a/templates/xhtml_slim.pt b/templates/xhtml_slim.pt index 992965820d..224a5b9e18 100644 --- a/templates/xhtml_slim.pt +++ b/templates/xhtml_slim.pt @@ -28,6 +28,7 @@

From Wikipedia, the free encyclopedia.

+